3.13.6 \(\int \frac {(c+d \tan (e+f x))^3}{a+b \tan (e+f x)} \, dx\) [1206]

Optimal. Leaf size=140 \[ \frac {\left (a c^3+3 b c^2 d-3 a c d^2-b d^3\right ) x}{a^2+b^2}+\frac {\left (b c^3-3 a c^2 d-3 b c d^2+a d^3\right ) \log (\cos (e+f x))}{\left (a^2+b^2\right ) f}+\frac {(b c-a d)^3 \log (a+b \tan (e+f x))}{b^2 \left (a^2+b^2\right ) f}+\frac {d^2 (c+d \tan (e+f x))}{b f} \]

[Out]

(a*c^3-3*a*c*d^2+3*b*c^2*d-b*d^3)*x/(a^2+b^2)+(-3*a*c^2*d+a*d^3+b*c^3-3*b*c*d^2)*ln(cos(f*x+e))/(a^2+b^2)/f+(-
a*d+b*c)^3*ln(a+b*tan(f*x+e))/b^2/(a^2+b^2)/f+d^2*(c+d*tan(f*x+e))/b/f

________________________________________________________________________________________

Rubi [A]
time = 0.19, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3647, 3707, 3698, 31, 3556} \begin {gather*} \frac {\left (-3 a c^2 d+a d^3+b c^3-3 b c d^2\right ) \log (\cos (e+f x))}{f \left (a^2+b^2\right )}+\frac {x \left (a c^3-3 a c d^2+3 b c^2 d-b d^3\right )}{a^2+b^2}+\frac {(b c-a d)^3 \log (a+b \tan (e+f x))}{b^2 f \left (a^2+b^2\right )}+\frac {d^2 (c+d \tan (e+f x))}{b f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*Tan[e + f*x])^3/(a + b*Tan[e + f*x]),x]

[Out]

((a*c^3 + 3*b*c^2*d - 3*a*c*d^2 - b*d^3)*x)/(a^2 + b^2) + ((b*c^3 - 3*a*c^2*d - 3*b*c*d^2 + a*d^3)*Log[Cos[e +
 f*x]])/((a^2 + b^2)*f) + ((b*c - a*d)^3*Log[a + b*Tan[e + f*x]])/(b^2*(a^2 + b^2)*f) + (d^2*(c + d*Tan[e + f*
x]))/(b*f)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3647

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si
mp[b^2*(a + b*Tan[e + f*x])^(m - 2)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(m + n - 1))), x] + Dist[1/(d*(m + n -
1)), Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + f*x])^n*Simp[a^3*d*(m + n - 1) - b^2*(b*c*(m - 2) + a*d*(
1 + n)) + b*d*(m + n - 1)*(3*a^2 - b^2)*Tan[e + f*x] - b^2*(b*c*(m - 2) - a*d*(3*m + 2*n - 4))*Tan[e + f*x]^2,
 x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
&& IntegerQ[2*m] && GtQ[m, 2] && (GeQ[n, -1] || IntegerQ[m]) &&  !(IGtQ[n, 2] && ( !IntegerQ[m] || (EqQ[c, 0]
&& NeQ[a, 0])))

Rule 3698

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[
A/(b*f), Subst[Int[(a + x)^m, x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && EqQ[A, C]

Rule 3707

Int[((A_) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2)/((a_.) + (b_.)*tan[(e_.) + (f_.)*
(x_)]), x_Symbol] :> Simp[(a*A + b*B - a*C)*(x/(a^2 + b^2)), x] + (Dist[(A*b^2 - a*b*B + a^2*C)/(a^2 + b^2), I
nt[(1 + Tan[e + f*x]^2)/(a + b*Tan[e + f*x]), x], x] - Dist[(A*b - a*B - b*C)/(a^2 + b^2), Int[Tan[e + f*x], x
], x]) /; FreeQ[{a, b, e, f, A, B, C}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0] && NeQ[a^2 + b^2, 0] && NeQ[A*b - a
*B - b*C, 0]

Rubi steps

\begin {align*} \int \frac {(c+d \tan (e+f x))^3}{a+b \tan (e+f x)} \, dx &=\frac {d^2 (c+d \tan (e+f x))}{b f}+\frac {\int \frac {b c^3-a d^3+b d \left (3 c^2-d^2\right ) \tan (e+f x)+d^2 (3 b c-a d) \tan ^2(e+f x)}{a+b \tan (e+f x)} \, dx}{b}\\ &=\frac {\left (a c^3+3 b c^2 d-3 a c d^2-b d^3\right ) x}{a^2+b^2}+\frac {d^2 (c+d \tan (e+f x))}{b f}+\frac {(b c-a d)^3 \int \frac {1+\tan ^2(e+f x)}{a+b \tan (e+f x)} \, dx}{b \left (a^2+b^2\right )}+\frac {\left (a d \left (3 c^2-d^2\right )-b \left (c^3-3 c d^2\right )\right ) \int \tan (e+f x) \, dx}{a^2+b^2}\\ &=\frac {\left (a c^3+3 b c^2 d-3 a c d^2-b d^3\right ) x}{a^2+b^2}+\frac {\left (b c^3-3 a c^2 d-3 b c d^2+a d^3\right ) \log (\cos (e+f x))}{\left (a^2+b^2\right ) f}+\frac {d^2 (c+d \tan (e+f x))}{b f}+\frac {(b c-a d)^3 \text {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \tan (e+f x)\right )}{b^2 \left (a^2+b^2\right ) f}\\ &=\frac {\left (a c^3+3 b c^2 d-3 a c d^2-b d^3\right ) x}{a^2+b^2}+\frac {\left (b c^3-3 a c^2 d-3 b c d^2+a d^3\right ) \log (\cos (e+f x))}{\left (a^2+b^2\right ) f}+\frac {(b c-a d)^3 \log (a+b \tan (e+f x))}{b^2 \left (a^2+b^2\right ) f}+\frac {d^2 (c+d \tan (e+f x))}{b f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.73, size = 126, normalized size = 0.90 \begin {gather*} \frac {\frac {(c+i d)^3 \log (i-\tan (e+f x))}{i a-b}-\frac {(c-i d)^3 \log (i+\tan (e+f x))}{i a+b}+\frac {2 (b c-a d)^3 \log (a+b \tan (e+f x))}{b^2 \left (a^2+b^2\right )}+\frac {2 d^2 (c+d \tan (e+f x))}{b}}{2 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*Tan[e + f*x])^3/(a + b*Tan[e + f*x]),x]

[Out]

(((c + I*d)^3*Log[I - Tan[e + f*x]])/(I*a - b) - ((c - I*d)^3*Log[I + Tan[e + f*x]])/(I*a + b) + (2*(b*c - a*d
)^3*Log[a + b*Tan[e + f*x]])/(b^2*(a^2 + b^2)) + (2*d^2*(c + d*Tan[e + f*x]))/b)/(2*f)

________________________________________________________________________________________

Maple [A]
time = 0.20, size = 164, normalized size = 1.17

method result size
derivativedivides \(\frac {\frac {d^{3} \tan \left (f x +e \right )}{b}+\frac {\frac {\left (3 a \,c^{2} d -a \,d^{3}-b \,c^{3}+3 b c \,d^{2}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (a \,c^{3}-3 a c \,d^{2}+3 b \,c^{2} d -b \,d^{3}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{a^{2}+b^{2}}+\frac {\left (-a^{3} d^{3}+3 a^{2} b c \,d^{2}-3 a \,b^{2} c^{2} d +b^{3} c^{3}\right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right ) b^{2}}}{f}\) \(164\)
default \(\frac {\frac {d^{3} \tan \left (f x +e \right )}{b}+\frac {\frac {\left (3 a \,c^{2} d -a \,d^{3}-b \,c^{3}+3 b c \,d^{2}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (a \,c^{3}-3 a c \,d^{2}+3 b \,c^{2} d -b \,d^{3}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{a^{2}+b^{2}}+\frac {\left (-a^{3} d^{3}+3 a^{2} b c \,d^{2}-3 a \,b^{2} c^{2} d +b^{3} c^{3}\right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right ) b^{2}}}{f}\) \(164\)
norman \(\frac {\left (a \,c^{3}-3 a c \,d^{2}+3 b \,c^{2} d -b \,d^{3}\right ) x}{a^{2}+b^{2}}+\frac {d^{3} \tan \left (f x +e \right )}{b f}+\frac {\left (3 a \,c^{2} d -a \,d^{3}-b \,c^{3}+3 b c \,d^{2}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f \left (a^{2}+b^{2}\right )}-\frac {\left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}\right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right ) b^{2} f}\) \(171\)
risch \(-\frac {6 i a^{2} c \,d^{2} e}{\left (a^{2}+b^{2}\right ) b f}-\frac {i x \,d^{3}}{i b -a}-\frac {x \,c^{3}}{i b -a}+\frac {3 x c \,d^{2}}{i b -a}+\frac {2 i d^{3}}{f b \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}+\frac {6 i a \,c^{2} d x}{a^{2}+b^{2}}+\frac {3 i x \,c^{2} d}{i b -a}+\frac {2 i a^{3} d^{3} e}{\left (a^{2}+b^{2}\right ) b^{2} f}-\frac {2 i b \,c^{3} e}{\left (a^{2}+b^{2}\right ) f}+\frac {6 i d^{2} c e}{b f}+\frac {6 i a \,c^{2} d e}{\left (a^{2}+b^{2}\right ) f}-\frac {2 i d^{3} a x}{b^{2}}+\frac {6 i d^{2} c x}{b}+\frac {2 i a^{3} d^{3} x}{\left (a^{2}+b^{2}\right ) b^{2}}-\frac {6 i a^{2} c \,d^{2} x}{\left (a^{2}+b^{2}\right ) b}-\frac {2 i b \,c^{3} x}{a^{2}+b^{2}}-\frac {2 i d^{3} a e}{b^{2} f}+\frac {d^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) a}{b^{2} f}-\frac {3 d^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) c}{b f}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i b +a}{i b -a}\right ) a^{3} d^{3}}{\left (a^{2}+b^{2}\right ) b^{2} f}+\frac {3 \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i b +a}{i b -a}\right ) a^{2} c \,d^{2}}{\left (a^{2}+b^{2}\right ) b f}-\frac {3 \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i b +a}{i b -a}\right ) a \,c^{2} d}{\left (a^{2}+b^{2}\right ) f}+\frac {b \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i b +a}{i b -a}\right ) c^{3}}{\left (a^{2}+b^{2}\right ) f}\) \(563\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d*tan(f*x+e))^3/(a+b*tan(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

1/f*(d^3/b*tan(f*x+e)+1/(a^2+b^2)*(1/2*(3*a*c^2*d-a*d^3-b*c^3+3*b*c*d^2)*ln(1+tan(f*x+e)^2)+(a*c^3-3*a*c*d^2+3
*b*c^2*d-b*d^3)*arctan(tan(f*x+e)))+(-a^3*d^3+3*a^2*b*c*d^2-3*a*b^2*c^2*d+b^3*c^3)/(a^2+b^2)/b^2*ln(a+b*tan(f*
x+e)))

________________________________________________________________________________________

Maxima [A]
time = 0.62, size = 175, normalized size = 1.25 \begin {gather*} \frac {\frac {2 \, d^{3} \tan \left (f x + e\right )}{b} + \frac {2 \, {\left (a c^{3} + 3 \, b c^{2} d - 3 \, a c d^{2} - b d^{3}\right )} {\left (f x + e\right )}}{a^{2} + b^{2}} + \frac {2 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \log \left (b \tan \left (f x + e\right ) + a\right )}{a^{2} b^{2} + b^{4}} - \frac {{\left (b c^{3} - 3 \, a c^{2} d - 3 \, b c d^{2} + a d^{3}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{a^{2} + b^{2}}}{2 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^3/(a+b*tan(f*x+e)),x, algorithm="maxima")

[Out]

1/2*(2*d^3*tan(f*x + e)/b + 2*(a*c^3 + 3*b*c^2*d - 3*a*c*d^2 - b*d^3)*(f*x + e)/(a^2 + b^2) + 2*(b^3*c^3 - 3*a
*b^2*c^2*d + 3*a^2*b*c*d^2 - a^3*d^3)*log(b*tan(f*x + e) + a)/(a^2*b^2 + b^4) - (b*c^3 - 3*a*c^2*d - 3*b*c*d^2
 + a*d^3)*log(tan(f*x + e)^2 + 1)/(a^2 + b^2))/f

________________________________________________________________________________________

Fricas [A]
time = 1.38, size = 206, normalized size = 1.47 \begin {gather*} \frac {2 \, {\left (a^{2} b + b^{3}\right )} d^{3} \tan \left (f x + e\right ) + 2 \, {\left (a b^{2} c^{3} + 3 \, b^{3} c^{2} d - 3 \, a b^{2} c d^{2} - b^{3} d^{3}\right )} f x + {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \log \left (\frac {b^{2} \tan \left (f x + e\right )^{2} + 2 \, a b \tan \left (f x + e\right ) + a^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) - {\left (3 \, {\left (a^{2} b + b^{3}\right )} c d^{2} - {\left (a^{3} + a b^{2}\right )} d^{3}\right )} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, {\left (a^{2} b^{2} + b^{4}\right )} f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^3/(a+b*tan(f*x+e)),x, algorithm="fricas")

[Out]

1/2*(2*(a^2*b + b^3)*d^3*tan(f*x + e) + 2*(a*b^2*c^3 + 3*b^3*c^2*d - 3*a*b^2*c*d^2 - b^3*d^3)*f*x + (b^3*c^3 -
 3*a*b^2*c^2*d + 3*a^2*b*c*d^2 - a^3*d^3)*log((b^2*tan(f*x + e)^2 + 2*a*b*tan(f*x + e) + a^2)/(tan(f*x + e)^2
+ 1)) - (3*(a^2*b + b^3)*c*d^2 - (a^3 + a*b^2)*d^3)*log(1/(tan(f*x + e)^2 + 1)))/((a^2*b^2 + b^4)*f)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 0.85, size = 1712, normalized size = 12.23 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))**3/(a+b*tan(f*x+e)),x)

[Out]

Piecewise((zoo*x*(c + d*tan(e))**3/tan(e), Eq(a, 0) & Eq(b, 0) & Eq(f, 0)), ((c**3*x + 3*c**2*d*log(tan(e + f*
x)**2 + 1)/(2*f) - 3*c*d**2*x + 3*c*d**2*tan(e + f*x)/f - d**3*log(tan(e + f*x)**2 + 1)/(2*f) + d**3*tan(e + f
*x)**2/(2*f))/a, Eq(b, 0)), (I*c**3*f*x*tan(e + f*x)/(2*b*f*tan(e + f*x) - 2*I*b*f) + c**3*f*x/(2*b*f*tan(e +
f*x) - 2*I*b*f) + I*c**3/(2*b*f*tan(e + f*x) - 2*I*b*f) + 3*c**2*d*f*x*tan(e + f*x)/(2*b*f*tan(e + f*x) - 2*I*
b*f) - 3*I*c**2*d*f*x/(2*b*f*tan(e + f*x) - 2*I*b*f) - 3*c**2*d/(2*b*f*tan(e + f*x) - 2*I*b*f) + 3*I*c*d**2*f*
x*tan(e + f*x)/(2*b*f*tan(e + f*x) - 2*I*b*f) + 3*c*d**2*f*x/(2*b*f*tan(e + f*x) - 2*I*b*f) + 3*c*d**2*log(tan
(e + f*x)**2 + 1)*tan(e + f*x)/(2*b*f*tan(e + f*x) - 2*I*b*f) - 3*I*c*d**2*log(tan(e + f*x)**2 + 1)/(2*b*f*tan
(e + f*x) - 2*I*b*f) - 3*I*c*d**2/(2*b*f*tan(e + f*x) - 2*I*b*f) - 3*d**3*f*x*tan(e + f*x)/(2*b*f*tan(e + f*x)
 - 2*I*b*f) + 3*I*d**3*f*x/(2*b*f*tan(e + f*x) - 2*I*b*f) + I*d**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*b*
f*tan(e + f*x) - 2*I*b*f) + d**3*log(tan(e + f*x)**2 + 1)/(2*b*f*tan(e + f*x) - 2*I*b*f) + 2*d**3*tan(e + f*x)
**2/(2*b*f*tan(e + f*x) - 2*I*b*f) + 3*d**3/(2*b*f*tan(e + f*x) - 2*I*b*f), Eq(a, -I*b)), (-I*c**3*f*x*tan(e +
 f*x)/(2*b*f*tan(e + f*x) + 2*I*b*f) + c**3*f*x/(2*b*f*tan(e + f*x) + 2*I*b*f) - I*c**3/(2*b*f*tan(e + f*x) +
2*I*b*f) + 3*c**2*d*f*x*tan(e + f*x)/(2*b*f*tan(e + f*x) + 2*I*b*f) + 3*I*c**2*d*f*x/(2*b*f*tan(e + f*x) + 2*I
*b*f) - 3*c**2*d/(2*b*f*tan(e + f*x) + 2*I*b*f) - 3*I*c*d**2*f*x*tan(e + f*x)/(2*b*f*tan(e + f*x) + 2*I*b*f) +
 3*c*d**2*f*x/(2*b*f*tan(e + f*x) + 2*I*b*f) + 3*c*d**2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*b*f*tan(e + f
*x) + 2*I*b*f) + 3*I*c*d**2*log(tan(e + f*x)**2 + 1)/(2*b*f*tan(e + f*x) + 2*I*b*f) + 3*I*c*d**2/(2*b*f*tan(e
+ f*x) + 2*I*b*f) - 3*d**3*f*x*tan(e + f*x)/(2*b*f*tan(e + f*x) + 2*I*b*f) - 3*I*d**3*f*x/(2*b*f*tan(e + f*x)
+ 2*I*b*f) - I*d**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*b*f*tan(e + f*x) + 2*I*b*f) + d**3*log(tan(e + f*
x)**2 + 1)/(2*b*f*tan(e + f*x) + 2*I*b*f) + 2*d**3*tan(e + f*x)**2/(2*b*f*tan(e + f*x) + 2*I*b*f) + 3*d**3/(2*
b*f*tan(e + f*x) + 2*I*b*f), Eq(a, I*b)), (x*(c + d*tan(e))**3/(a + b*tan(e)), Eq(f, 0)), (-2*a**3*d**3*log(a/
b + tan(e + f*x))/(2*a**2*b**2*f + 2*b**4*f) + 6*a**2*b*c*d**2*log(a/b + tan(e + f*x))/(2*a**2*b**2*f + 2*b**4
*f) + 2*a**2*b*d**3*tan(e + f*x)/(2*a**2*b**2*f + 2*b**4*f) + 2*a*b**2*c**3*f*x/(2*a**2*b**2*f + 2*b**4*f) - 6
*a*b**2*c**2*d*log(a/b + tan(e + f*x))/(2*a**2*b**2*f + 2*b**4*f) + 3*a*b**2*c**2*d*log(tan(e + f*x)**2 + 1)/(
2*a**2*b**2*f + 2*b**4*f) - 6*a*b**2*c*d**2*f*x/(2*a**2*b**2*f + 2*b**4*f) - a*b**2*d**3*log(tan(e + f*x)**2 +
 1)/(2*a**2*b**2*f + 2*b**4*f) + 2*b**3*c**3*log(a/b + tan(e + f*x))/(2*a**2*b**2*f + 2*b**4*f) - b**3*c**3*lo
g(tan(e + f*x)**2 + 1)/(2*a**2*b**2*f + 2*b**4*f) + 6*b**3*c**2*d*f*x/(2*a**2*b**2*f + 2*b**4*f) + 3*b**3*c*d*
*2*log(tan(e + f*x)**2 + 1)/(2*a**2*b**2*f + 2*b**4*f) - 2*b**3*d**3*f*x/(2*a**2*b**2*f + 2*b**4*f) + 2*b**3*d
**3*tan(e + f*x)/(2*a**2*b**2*f + 2*b**4*f), True))

________________________________________________________________________________________

Giac [A]
time = 0.72, size = 176, normalized size = 1.26 \begin {gather*} \frac {\frac {2 \, d^{3} \tan \left (f x + e\right )}{b} + \frac {2 \, {\left (a c^{3} + 3 \, b c^{2} d - 3 \, a c d^{2} - b d^{3}\right )} {\left (f x + e\right )}}{a^{2} + b^{2}} - \frac {{\left (b c^{3} - 3 \, a c^{2} d - 3 \, b c d^{2} + a d^{3}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{a^{2} + b^{2}} + \frac {2 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \log \left ({\left | b \tan \left (f x + e\right ) + a \right |}\right )}{a^{2} b^{2} + b^{4}}}{2 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^3/(a+b*tan(f*x+e)),x, algorithm="giac")

[Out]

1/2*(2*d^3*tan(f*x + e)/b + 2*(a*c^3 + 3*b*c^2*d - 3*a*c*d^2 - b*d^3)*(f*x + e)/(a^2 + b^2) - (b*c^3 - 3*a*c^2
*d - 3*b*c*d^2 + a*d^3)*log(tan(f*x + e)^2 + 1)/(a^2 + b^2) + 2*(b^3*c^3 - 3*a*b^2*c^2*d + 3*a^2*b*c*d^2 - a^3
*d^3)*log(abs(b*tan(f*x + e) + a))/(a^2*b^2 + b^4))/f

________________________________________________________________________________________

Mupad [B]
time = 5.59, size = 178, normalized size = 1.27 \begin {gather*} \frac {d^3\,\mathrm {tan}\left (e+f\,x\right )}{b\,f}-\frac {\ln \left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}{f\,\left (a^2\,b^2+b^4\right )}+\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,\left (-c^3\,1{}\mathrm {i}+3\,c^2\,d+c\,d^2\,3{}\mathrm {i}-d^3\right )}{2\,f\,\left (a+b\,1{}\mathrm {i}\right )}+\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\left (-c^3+c^2\,d\,3{}\mathrm {i}+3\,c\,d^2-d^3\,1{}\mathrm {i}\right )}{2\,f\,\left (b+a\,1{}\mathrm {i}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*tan(e + f*x))^3/(a + b*tan(e + f*x)),x)

[Out]

(d^3*tan(e + f*x))/(b*f) - (log(a + b*tan(e + f*x))*(a^3*d^3 - b^3*c^3 + 3*a*b^2*c^2*d - 3*a^2*b*c*d^2))/(f*(b
^4 + a^2*b^2)) + (log(tan(e + f*x) - 1i)*(c*d^2*3i + 3*c^2*d - c^3*1i - d^3))/(2*f*(a + b*1i)) + (log(tan(e +
f*x) + 1i)*(3*c*d^2 + c^2*d*3i - c^3 - d^3*1i))/(2*f*(a*1i + b))

________________________________________________________________________________________